﻿@using HZT.Framework.Contract
@using HZT.Framework.Web.Controls
@using AD.Contract.Models
@using AD.WebEx
@model PagedList<Period>
@{
    Layout = "~/Views/Shared/_Layout.Select.cshtml";
}
@{
    ViewBag.Title = "广告业务台账";
}
@section PageSpecificJavascriptIncludes{
    <script type="text/javascript">
        function returnVal(id, Name) {

            parent.$("#CustomerId").val(id);
            parent.$("#customer_Name").val(Name);
            parent.tb_remove();
        }
    </script>
}
@section PageSpecificStyleSheetIncludes{
}
@section MainContent{
    <div>
        <div>
            @using (Html.BeginForm(null, null, null, FormMethod.Get, new { id = "search", @class = "form-inline" }))
            { 
                <div class="p5">
                    <label>
                        时段名称：</label>@Html.TextBox("Name", Request["Name"], new { @class = "m-wrap small" })&nbsp;
                    <button type="submit" class="btn">
                        搜索 <i class="icon-search"></i>
                    </button>
                </div>  
            }
        </div>
        <table class="table table-striped table-hover ">
            <thead>
                <tr>
                    <th style="width: 8px;">
                        <input type="checkbox" id="checkall" class="group-checkable" />
                    </th>
                    <th width="80">
                        时段名称
                    </th>
                    
                    <th width="80">
                        选择
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var p in Model)
                {
                    <tr>
                        <td>
                            <input type="checkbox" class="checkboxes" name='ids' value='@p.Id' />
                        </td>
                        <td class="blue">
                            <span>@(p.Name)</span>
                        </td> 
                        <th>
                            <a class="btn mini purple thickbox" title='' href="#" onclick="returnVal('@p.Id','@p.Name');">
                                <i class="icon-trash"></i>选择 </a>
                        </th>
                    </tr>
                }
            </tbody>
        </table>
        <div class="dataTables_paginate paging_bootstrap pagination">
            @Html.Pager(Model, new PagerOptions() { ShowTotalItemCount = true })
        </div>
    </div>
}
